package org.stream.answerduel.vo.Message;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.stream.answerduel.vo.Message.EnumType.ResultType;

/**
 * 功能描述：存储最终对战结果信息
 *
 * @Auther: 苏建誉
 * @Date: 2019/7/11 22:48
 */
@Data
public class ResultMessage extends Message{
    private ResultType resultType;

    private int rightCount;

    private int wrongCount;

    private int noChoiceCount;

    public ResultMessage()
    {
        super(Type.FinalResult);
    }
    public ResultMessage(ResultType resultType,int rightCount,int wrongCount,int noChoiceCount){
        super(Type.FinalResult);
        this.resultType=resultType;
        this.rightCount=rightCount;
        this.wrongCount=wrongCount;
        this.noChoiceCount=noChoiceCount;
    }
    public ResultMessage(ResultType resultType)
    {
        super(Type.FinalResult);
        this.resultType = resultType;
    }
    @Override
    public String toString(){
        return JSON.toJSONString(this);
    }
}
